package servlet.wxpay.sdk;

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

/**
 * 微信扫码支付配置类
 * @author jiangmingliang
 */
public class MyConfig extends WXPayConfig {

    /**
     * AppID
     * @return
     */
    @Override
    public String getAppID() {
        return "wxab8acb865bb1637e";
    }

    /**
     * MchID(商户号)
     */
    @Override
    public String getMchID() {
        return "11473623";
    }

    /**
     * API秘钥
     */
    @Override
    public String getKey() {
        return "2ab9071b06b9f739b950ddb41db2690d";
    }
    @Override
    public InputStream getCertStream() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IWXPayDomain getWXPayDomain() {
        IWXPayDomain iwxPayDomain = new IWXPayDomain() {
            @Override
            public void report(String domain, long elapsedTimeMillis, Exception ex) {

            }
            @Override
            public DomainInfo getDomain(WXPayConfig config) {
                return new IWXPayDomain.DomainInfo(WXPayConstants.DOMAIN_API, true);
            }
        };
        return iwxPayDomain;
    }

    /**
     * 回调地址
     * @return
     */
    public String getNotifyUrl(){
        return "http://8um53x.natappfree.cc/pay_demo/WxPayNotifyServlet";
    }
}
